package cn.xy.commons.exception;


import cn.xy.commons.constant.Consts;

/**
 * jz异常类
 *
 *  @author xy
 */
public class JzException extends Exception {

    /**
     * 错误代码
     */
    private final int code;

    public JzException(int code, String message) {
        super(message);
        this.code = code;
    }

    public JzException(Exception e) {
        super(e);
        this.code = Consts.ERROR_CODE;
    }

    public int getCode() {
        return code;
    }

}
